package com.didi.gulimall.cart.service;

import com.didi.gulimall.cart.vo.Cart;
import com.didi.gulimall.cart.vo.CartItem;
import com.didi.gulimall.common.exception.DuplicateFieldsException;
import com.didi.gulimall.common.to.OrderBackVo;
import com.didi.gulimall.common.utils.R;
import org.springframework.ui.Model;

import java.util.List;
import java.util.concurrent.ExecutionException;

public interface CartService {
    void addToCart(Long skuId, Integer num) throws  ExecutionException, InterruptedException;

    CartItem getCartItem(Long skuId);

    String getCartList(Model model) throws ExecutionException, InterruptedException;

    void changeItemCount(Long skuId, Integer num);

    void checkItem(Long skuId, Integer check);

    void removeItem(Long skuId);

    R memberCartItems();

    R memberListNoUpdateProduct();

    void orderBack(OrderBackVo orderBackVo);

    R orderRemoveItem(List<CartItem> items);

    void addCartCache(Long skuId, Integer num) throws ExecutionException, InterruptedException;
}
